package com.ymatou.userregister.testcase;

import java.util.ArrayList;
import java.util.List;

import com.ymatou.userregister.parameter.YmatouUserRegBean;
import com.ymatou.userregister.service.YmatouUserRegCall;
import com.ymttest.database.mongo.UserTokenWapper;
import com.ymttest.utils.TestDataManager;

public class add {
	private static YmatouUserRegBean regBean;
	private static YmatouUserRegCall regCall;
	private static UserTokenWapper userTokenWapper;

	public static void main(String[] args) {
		List<Integer> idsIntegers = new ArrayList<Integer>();
		try {

			regBean = new YmatouUserRegBean();
			regCall = new YmatouUserRegCall();
			userTokenWapper = new UserTokenWapper();

			// TODO Auto-generated method stub

			for (int i = 0; i < 10; i++) {
				String loginId = "RegTest_" + TestDataManager.getRandomNum(10);
				String email = TestDataManager.getRandomNum(10) + "@ymatou.com";

				regBean.setClientIp("1.1.1.1");
				regBean.setIsAgreeContract(true);
				regBean.setLoginId(loginId);
				regBean.setLoginMail(email);
				regBean.setLoginMobile(TestDataManager.getPhoneNum());
				regBean.setPas("123456");
				regBean.setRegisterType(0);
				regBean.setRegSource(1);
				regBean.setTokenTimeOut(2000L);
				regBean.setVisitLan(1);
				regCall.setData(regBean);
				regCall.callService();
				
				idsIntegers.add(regCall.getUserId());
			}
		} catch (Exception e) {
			// TODO: handle exception
		}

		for (Integer integer : idsIntegers) {
			System.out.println(integer);
		}

	}

}
